home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn1.000 / inn1.4sec-linux-src.tar / inn / nnrpd / Makefile < prev    next >
Makefile  |  1993-03-18  |  2KB  |  96 lines

  1. ##  $Revision: 1.16 $
  2. SHELL    = /bin/sh
  3. MAKE    = make
  4. ##  =()<P    = @<P>@>()=
  5. P    = 
  6.  
  7. ##  =()<CC    = @<CC>@>()=
  8. CC    = cc
  9. ##  =()<DEFS    = @<DEFS>@>()=
  10. DEFS    = -I../include
  11. ##  =()<CFLAGS    = @<CFLAGS>@>()=
  12. CFLAGS    = $(DEFS) -g
  13. ##  =()<LDFLAGS    = @<LDFLAGS>@>()=
  14. LDFLAGS    = -g
  15. ##  =()<LINTFLAGS    = @<LINTFLAGS>@>()=
  16. LINTFLAGS    = -b -h -z $(DEFS)
  17. ##  =()<LINTFILTER    = @<LINTFILTER>@>()=
  18. LINTFILTER    = | sed -n -f ../sedf.sun
  19. ##  =()<CTAGS        = @<CTAGS>@>()=
  20. CTAGS        = ctags -t -w
  21. ##  =()<PROF    = @<PROF>@>()=
  22. PROF    = -pg
  23.  
  24. ##  =()<NNRPD    = @<_PATH_NNRPD>@>()=
  25. NNRPD    = /news/bin/nnrpd
  26. ## =()<OWNER    = -O @<NEWSUSER>@ -G @<NEWSGROUP>@>()=
  27. OWNER    = -O news -G news
  28.  
  29. ##  =()<LIBS    = @<LIBS>@>()=
  30. LIBS    = 
  31. LIBNEWS    = ../libinn.a
  32. LINTLIB    = ../llib-linn.ln
  33.  
  34. SOURCES    = \
  35.     article.c group.c commands.c misc.c newnews.c nnrpd.c post.c loadave.c
  36.  
  37. OBJECTS    = \
  38.     article.o group.o commands.o misc.o newnews.o nnrpd.o post.o loadave.o
  39.  
  40. ALL    = nnrpd
  41.  
  42. all:        $(ALL)
  43.  
  44. install:    $(NNRPD)
  45.  
  46. ##  Low-level install actions.
  47. $(NNRPD):    nnrpd
  48.     $(SHELL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@
  49.  
  50. clobber clean:
  51.     rm -f *.o $(ALL)
  52.     rm -f nnrpd nnrpdp profiled
  53.     rm -f all install lint
  54.  
  55. tags ctags:    $(SOURCES)
  56.     $(CTAGS) $(SOURCES) ../lib/*.c nnrpd.h ../include/*.h
  57.  
  58. nnrpd:        $(P) $(OBJECTS) $(LIBNEWS)
  59.     @rm -f $@
  60.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBNEWS) $(LIBS)
  61.  
  62. lint:        $(ALL)
  63.     @rm -f lint
  64.     lint $(LINTFLAGS) $(SOURCES) $(LINTLIB) $(LINTFILTER) >lint
  65.  
  66. ../include/dbz.h:
  67.     (cd ../lib ; $(MAKE) ../include/dbz.h)
  68. $(LIBNEWS) $(LINTLIB):
  69.     (cd ../lib ; $(MAKE) install )
  70.  
  71. ##  Profiling.  The rules are a bit brute-force, but good enough.
  72. profiled:    nnrpdp
  73.     date >$@
  74.  
  75. nnrpdp:        $(SOURCES)
  76.     rm -f $(OBJECTS)
  77.     $(MAKE) nnrpd CFLAGS="$(CFLAGS) $(PROF)" LIBNEWS=../libinn_p.a
  78.     mv nnrpd nnrpdp
  79.     rm -f $(OBJECTS)
  80.  
  81. ccenter:    $(SOURCES)
  82.     #load $(CFLAGS) $(SOURCES) $(LIBNEWS)
  83.  
  84. ##  Dependencies.  Default list, below, is probably good enough.
  85. depend:        Makefile $(SOURCES)
  86.     makedepend $(DEFS) $(SOURCES)
  87.  
  88. # DO NOT DELETE THIS LINE -- make depend depends on it.
  89. $(OBJECTS):    nnrpd.h \
  90.         ../include/clibrary.h ../include/configdata.h \
  91.         ../include/libinn.h ../include/logging.h \
  92.         ../include/macros.h ../include/nntp.h \
  93.         ../include/paths.h ../include/qio.h
  94. group.o:    ../include/mydir.h
  95. misc.o:        ../include/dbz.h
  96.